import express from 'express';
import cors from 'cors';
import dotenv from 'dotenv';
import deviceRoutes from './routes/device.route.js';

dotenv.config();
const app = express();

app.use(cors());
app.use(express.json());

app.get('/', (req, res) => {
    res.send('应用启动成功，访问其他路由查看数据');
});
app.use('/devices', deviceRoutes);

export default app;
